package net.sipvip.client;

import com.google.gwt.core.client.EntryPoint;

import com.google.gwt.user.client.DOM;
import com.google.gwt.user.client.Timer;
import com.google.gwt.user.client.rpc.AsyncCallback;
import com.google.gwt.user.client.ui.Button;
import com.google.gwt.user.client.ui.DecoratorPanel;
import com.google.gwt.user.client.ui.DialogBox;
import com.google.gwt.user.client.ui.Grid;
import com.google.gwt.user.client.ui.HTML;
import com.google.gwt.user.client.ui.Image;
import com.google.gwt.user.client.ui.Label;
import com.google.gwt.user.client.ui.RootPanel;
import com.google.gwt.user.client.ui.StackPanel;
import com.google.gwt.user.client.ui.TextBox;
import com.google.gwt.user.client.ui.VerticalPanel;

/**
 * Entry point classes define <code>onModuleLoad()</code>.
 */
public class Wwwseksitreffiteu implements EntryPoint {
	
	final DecoratorPanel MainDcPanel = new DecoratorPanel();
	final Grid MainGrPanel = new Grid(1,3);
	final Grid rightGrPanel = new Grid(3,1);
	final StackPanel MainStPanel = new StackPanel();
	final Image tubeImg = new Image("/images/tube.jpg");
	final Image logo = new Image("/images/logo.jpg");
	final String globcookies="";

	public void onModuleLoad() {
		timer.schedule(3000);
		Utils.track("load");
		
		MainStPanel.add(new VideosBox("http://89.18.248.118:7900/videos/jscallback?callback="), "Viimeisemmat Videot");
		MainStPanel.add(new VideosBoxYT("http://gdata.youtube.com/feeds/api/videos?alt=json-in-script&q=porno|sex&orderby=relevance_lang_fi&max-results=25&v=2&callback="), "SeksiTube");
		MainStPanel.add(new VideosBox("http://89.18.248.118:7900/videos/jscallbackrand?callback="), "Videot1");
		MainStPanel.add(new VideosBox("http://89.18.248.118:7900/videos/jscallbackrand?callback="), "Videot2");
		MainStPanel.add(new VideosBox("http://89.18.248.118:7900/videos/jscallbackrand?callback="), "Videot3");
		MainStPanel.add(new VideosBox("http://89.18.248.118:7900/videos/jscallbackrand?callback="), "Videot4");
		MainStPanel.add(new VideosBox("http://89.18.248.118:7900/videos/jscallbackrand?callback="), "Videot5");
		
	
		
		MainGrPanel.setWidget(0, 0, tubeImg);
		MainDcPanel.add(MainStPanel);
		MainGrPanel.setWidget(0, 1, MainDcPanel);
		
		rightGrPanel.setWidget(0, 0, logo);

		rightGrPanel.setVisible(false);

		MainGrPanel.setWidget(0, 2, rightGrPanel);
		MainGrPanel.setVisible(false);
		
		RootPanel.get("start").add(MainGrPanel);
		DOM.setInnerHTML(RootPanel.get("loading").getElement(), "");
	}
	
		
	Timer timer = new Timer() {
		// @Override
		public void run() {

			// DOM.setInnerHTML(RootPanel.get("google2").getElement(), google);
			// DOM.setStyleAttribute(RootPanel.get("loading").getElement(),"color",
			// "red");
			MainGrPanel.setVisible(true);
			RightPublicity.ipjson(rightGrPanel,MainStPanel);

		}
	};


}
